package game.basic;

import javafx.scene.image.Image;

import java.io.IOException;
import java.io.InputStream;

public class Util {
    public static Image getImage(String url, int width, int height) {
        try (InputStream is = Util.class.getResourceAsStream(url)) {
            if (is != null) {
                return new Image(is, width, height, true, true);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }

}
